import Vue from 'vue';
import Router from 'vue-router';
import Index from 'components/index/index';
// Cv  预览简历
const Cv = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/resume');
const Position = () =>
  import( /* webpackChunkName: "module-person" */ 'components/work/position');
//职位详情
const WorkInfo = () =>
  import( /* webpackChunkName: "module-person" */ 'components/work/workInfo');
//User  我的
const User = () =>
  import( /* webpackChunkName: "module-User" */ 'components/user/user');
// 个人简历编辑
const Cvitae = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/cvitae');
//  简历模板
const Template = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/template');
//  编辑个人信息
const Essential = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/essential');
//  投递简历列表
const TdList = () =>
  import( /* webpackChunkName: "module-user" */ 'components/user/tdList');
//  投递简历列表
const GwList = () =>
  import( /* webpackChunkName: "module-person" */ 'components/user/gwList');

// 求职意向
const Job = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/jobintention');

// 个人评价
const Selft = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/selft');

// 工作经历
const Workex = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/workex');

// 语言能力
const Language = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/language');
//教育经历
const Education = () =>
  import( /* webpackChunkName: "module-Cv" */ 'components/cv/education');
Vue.use(Router);

const router = new Router({
  routes: [{
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'index',
      component: Index,
      redirect: "/position",
      meta: {
        title: '毕业生网上招聘'
      },
      children: [{
        path: '/position',
        name: 'position',
        component: Position,
        meta: {
          title: '职位'
        }
      }, {
        path: '/cv',
        name: 'cv',
        component: Cv,
        meta: {
          title: '个人简历'
        }
      }, {
        path: '/user',
        name: 'user',
        component: User,
        meta: {
          title: '我的'
        }
      }, {
        path: '/tdlist',
        name: 'tdlist',
        component: TdList,
        meta: {
          title: '投递列表'
        }
      }, {
        path: '/gwlist',
        name: 'gwlist',
        component: GwList,
        meta: {
          title: '收藏岗位'
        }
      }],
    }, {
      path: '/workInfo',
      name: 'workInfo',
      component: WorkInfo,
      meta: {
        title: '职位详情'
      }
    }, {
      path: '/cvitae',
      name: 'cvitae',
      component: Cvitae,
      meta: {
        title: '个人简历'
      }
    }, {
      path: '/template',
      name: 'template',
      component: Template,
      meta: {
        title: '简历模板'
      }
    }, {
      path: '/essential',
      name: 'essential',
      component: Essential,
      meta: {
        title: '编辑个人信息'
      }
    }, {
      path: '/job',
      name: 'job',
      component: Job,
      meta: {
        title: '求职意向'
      }
    }, {
      path: '/selft',
      name: 'selft',
      component: Selft,
      meta: {
        title: '个人评价'
      }
    }, {
      path: '/workex',
      name: 'workex',
      component: Workex,
      meta: {
        title: '工作经历'
      }
    }, {
      path: '/language',
      name: 'language',
      component: Language,
      meta: {
        title: '语言能力'
      }
    }, {
      path: '/education',
      name: 'education',
      component: Education,
      meta: {
        title: '教育培训经历'
      }
    }

  ]
});
export default router
